num_list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

sum = 0
max_num = -float('inf')
min_num = float('inf')

i = 0
while i < len(num_list):
    sum += num_list[i]  # 累加
    if num_list[i] > max_num:  # 判断最大值for
        max_num = num_list[i]
    if num_list[i] < min_num:  # 判断最小值j
        min_num = num_list[i]
    i += 1

avg_num = sum / len(num_list)  # 求平均

print(f'和：{sum}\n最大值：{max_num}\n最小值：{min_num}\n平均数：{avg_num}')
